<template>
  <span>测试一下22{{ code }}</span>
</template>

<script>
import axios from 'axios'

export default {
  title: '首页',
  name: 'Home',
  async asyncData({ params }) {
    // 在asyncData中获取数据
    const data = await axios({
      method: 'get',
      url: 'http://localhost:3001/common/v1/questions',
    })
    // 返回数据对象
    return {
      code: data.data.code,
    }
  },
  data() {
    return {}
  },
  computed: {},
  mounted() {
  },
}
</script>

<style lang="less" scoped></style>
